function Changemoney (ply,amount)
	local plyuni = ply:UniqueID()
	if (amount + servertable["ply"][plyuni]["money"] < 0) then 
		ply:PrintMessage(HUD_PRINTCENTER, "You don't have enough money" )
		return false
	end
	ply:PrintMessage(HUD_PRINTCHAT, "Got " .. amount .. " $" )
	servertable["ply"][plyuni]["money"] = servertable["ply"][plyuni]["money"] + amount
	local rp = RecipientFilter()
	rp:AddPlayer(ply)
	umsg.Start("MoneyChange", rp)
	umsg.Long(servertable["ply"][plyuni]["money"])
	umsg.End()
	return true
end

function DropMoney (ply,dummy,amount)
	local amount = amount[1]
	local plyuni = ply:UniqueID()
	if ((servertable["ply"][plyuni]["money"] -amount) < 0) then 
		ply:PrintMessage(HUD_PRINTCENTER, "You don't have enough money" )
		return
	end
	local 	Buyedentity = ents.Create("moneydrop")
	Buyedentity:SetAngles(Vector(0,0,0))
	Buyedentity:SetPos(ply:GetPos())
	Buyedentity:Spawn()
	Buyedentity.amount = amount
	if ( Buyedentity:GetPhysicsObject():IsValid() ) then
		Buyedentity:Activate()				
		ply:PrintMessage(HUD_PRINTCHAT, "Dropped " .. amount .. " $" )
		servertable["ply"][plyuni]["money"] = servertable["ply"][plyuni]["money"] - amount
		local rp = RecipientFilter()
		rp:AddPlayer(ply)
		umsg.Start("MoneyChange", rp)
		umsg.Long(servertable["ply"][plyuni]["money"])
		umsg.End()
	end	
end
concommand.Add("DropMoney",DropMoney)  